//
//  ImageViewViewController.m
//  ImageView
//

#import "ImageViewViewController.h"

@implementation ImageViewViewController

- (void)viewDidLoad {
    [super viewDidLoad];
	
	NSArray *arrImages = [[NSArray alloc] initWithObjects:
						  [UIImage imageNamed:@"image1.png"],
						  [UIImage imageNamed:@"image2.png"],
						  [UIImage imageNamed:@"image3.png"], nil];
	
	CGRect viewFrame = CGRectMake(0, 0, 200, 200);
	UIImageView *myImageView = [[UIImageView alloc] initWithFrame:viewFrame];
	myImageView.contentMode = UIViewContentModeScaleAspectFit;
	
	[myImageView setAnimationImages:arrImages];
	
	[myImageView setAnimationRepeatCount:0];
	[myImageView setAnimationDuration:0.5];
	
	[self.view addSubview:myImageView];
	[myImageView startAnimating];
	
	[arrImages release];
	[myImageView release];
}

- (void)dealloc {
    [super dealloc];
}

@end
